import { http } from "@/utils/http";

const baseUrl = "http://localhost:8080";
//const baseUrl = "http://39.106.226.13:8080";
// 定义API响应类型
interface ApiResponse<T> {
  message: string;
  msg: string;
  data?: T;
}

/** 微信登录
 * @param data 包含微信授权码的参数对象
 * @returns Promise
 */
export const getWxLogin = (data: any) => {
  return http.request<ApiResponse<any>>("post", `${baseUrl}/login`, {
    data: data
  });
};

/**
 * ai总结会议
 */
export const getAISummary = (data: any) => {
  return http.request<ApiResponse<any>>("post", `${baseUrl}/api/summary`, {
    data: data
  });
};
